﻿CREATE TABLE [CO].[AssessmentGroup] (
    [Id]       INT           NOT NULL,
    [Name]     VARCHAR (100) NOT NULL,
    [Note]     VARCHAR (250) NULL,
    [MD]       DATETIME      CONSTRAINT [DF__AssessmentGr__MD__7073AF84] DEFAULT (getdate()) NOT NULL,
    [MW]       VARCHAR (50)  CONSTRAINT [DF__AssessmentGr__MW__7167D3BD] DEFAULT (suser_sname()) NOT NULL,
    [ToDelete] BIT           DEFAULT ((0)) NOT NULL,
    CONSTRAINT [PK_AssessmentGroup] PRIMARY KEY CLUSTERED ([Id] ASC)
);


GO
CREATE NONCLUSTERED INDEX [IX_AssessmentGroup_Name]
    ON [CO].[AssessmentGroup]([Name] ASC);


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Признак того, что запись нужно удалить из БД всех подразделений', @level0type = N'SCHEMA', @level0name = N'CO', @level1type = N'TABLE', @level1name = N'AssessmentGroup', @level2type = N'COLUMN', @level2name = N'ToDelete';

